package common;

import java.util.ArrayList;
import java.util.List;

import connection.IServerConnection;

public class BodySet {

	private List<Locutor> locutors = new ArrayList<Locutor>();
	private EasyChatEnvironment environment;
	private IServerConnection connection;
	private Locutor me;

	public BodySet(EasyChatEnvironment easyChatEnvironment) {
		this.environment = easyChatEnvironment;
	}

	public void addLocutor(Locutor locutor) {
		this.locutors.add(locutor);

	}

	public Locutor createLocutor(String Id) {
		Locutor locutor = new Locutor(this, Id);
		locutors.add(locutor);
		return locutor;
	}

	public IServerConnection getConnection() {
		return connection;
	}

	public EasyChatEnvironment getEnvironment() {
		return environment;
	}

	public List<Locutor> getLocutors() {
		return locutors;
	}

	public Locutor getMe() {
		return me;
	}

	public void setConnection(IServerConnection connection) {
		this.connection = connection;
	}

	public void setEnvironment(EasyChatEnvironment environment) {
		this.environment = environment;
	}

	public void setLocutors(List<Locutor> locutors) {
		this.locutors = locutors;
	}

	public void setMe(Locutor me) {
		this.me = me;
	}

}
